﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model.Account;
using Model.Interfaces;

namespace Model.Entities.PublicationRules
{
    public class RankingPublicationRule : IPublicationRule
    {
        public decimal MinRenterRanking { get; private set; }

        public RankingPublicationRule(decimal minRenterRanking)
        {
            this.MinRenterRanking = minRenterRanking;
        }

        public bool IsVisibleForUser(User renter)
        {
            return (renter.Ranking.Value > this.MinRenterRanking);
        }

    }
}
